package cz.cvut.fel.gfupan.gui.tab;

import cz.cvut.fel.gfupan.gui.MeasurePanel;
import cz.cvut.fel.gfupan.gui.Session;
import cz.cvut.fel.gfupan.gui.action.LoadFAction;
import cz.cvut.fel.gfupan.gui.component.Button;
import cz.cvut.fel.gfupan.gui.component.TextField;
import cz.cvut.fel.gfupan.gui.execution.Average;
import cz.cvut.fel.gfupan.gui.util.Coordinates;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import javax.swing.JComponent;

public class InclinationTab extends AbstractTab {

    private MeasurePanel parent;

    public InclinationTab(MeasurePanel parent) {
        this.parent = parent;
        tab = new HashMap<Coordinates, JComponent>();
        initComponents();
        fill();
        actualCoords = new Coordinates(0, 0);
    }

    @Override
    public void setObservers() {
        //time
        addObserver(inclinationMeasure1Hours, inclinationInclinationHours);
        addObserver(inclinationMeasure2Hours, inclinationInclinationHours);
        addObserver(inclinationMeasure3Hours, inclinationInclinationHours);
        addObserver(inclinationMeasure4Hours, inclinationInclinationHours);
        setExecutor(inclinationInclinationHours, new Average(inclinationMeasure1Hours,
                inclinationMeasure2Hours, inclinationMeasure3Hours, inclinationMeasure4Hours));

        addObserver(inclinationMeasure1Minutes, inclinationInclinationMinutes);
        addObserver(inclinationMeasure2Minutes, inclinationInclinationMinutes);
        addObserver(inclinationMeasure3Minutes, inclinationInclinationMinutes);
        addObserver(inclinationMeasure4Minutes, inclinationInclinationMinutes);
        setExecutor(inclinationInclinationMinutes, new Average(inclinationMeasure1Minutes,
                inclinationMeasure2Minutes, inclinationMeasure3Minutes, inclinationMeasure4Minutes));

        addObserver(inclinationMeasure1Seconds, inclinationInclinationSeconds);
        addObserver(inclinationMeasure2Seconds, inclinationInclinationSeconds);
        addObserver(inclinationMeasure3Seconds, inclinationInclinationSeconds);
        addObserver(inclinationMeasure4Seconds, inclinationInclinationSeconds);
        setExecutor(inclinationInclinationSeconds, new Average(inclinationMeasure1Seconds,
                inclinationMeasure2Seconds, inclinationMeasure3Seconds, inclinationMeasure4Seconds));

        //angles
        addObserver(inclinationMeasure1Dd, inclinationInclinationDd);
        addObserver(inclinationMeasure2Dd, inclinationInclinationDd);
        addObserver(inclinationMeasure3Dd, inclinationInclinationDd);
        addObserver(inclinationMeasure4Dd, inclinationInclinationDd);
        setExecutor(inclinationInclinationDd, new Average(inclinationMeasure1Dd,
                inclinationMeasure2Dd, inclinationMeasure3Dd, inclinationMeasure4Dd));

        addObserver(inclinationMeasure1Mm, inclinationInclinationMm);
        addObserver(inclinationMeasure2Mm, inclinationInclinationMm);
        addObserver(inclinationMeasure3Mm, inclinationInclinationMm);
        addObserver(inclinationMeasure4Mm, inclinationInclinationMm);
        setExecutor(inclinationInclinationMm, new Average(inclinationMeasure1Mm,
                inclinationMeasure2Mm, inclinationMeasure3Mm, inclinationMeasure4Mm));

        addObserver(inclinationMeasure1Ss, inclinationInclinationSs);
        addObserver(inclinationMeasure2Ss, inclinationInclinationSs);
        addObserver(inclinationMeasure3Ss, inclinationInclinationSs);
        addObserver(inclinationMeasure4Ss, inclinationInclinationSs);
        setExecutor(inclinationInclinationSs, new Average(inclinationMeasure1Ss,
                inclinationMeasure2Ss, inclinationMeasure3Ss, inclinationMeasure4Ss));

        //autofill
        autoFillLoop(inclinationMeasure1Hours, inclinationMeasure2Hours, inclinationMeasure3Hours, inclinationMeasure4Hours);
        autoFillLoop(inclinationMeasure1Minutes, inclinationMeasure2Minutes, inclinationMeasure3Minutes, inclinationMeasure4Minutes);
        autoFillLoop(inclinationMeasure1Seconds, inclinationMeasure2Seconds, inclinationMeasure3Seconds, inclinationMeasure4Seconds);

        autoFillLoop(inclinationMeasure1Dd, inclinationMeasure2Dd, inclinationMeasure3Dd, inclinationMeasure4Dd);
        autoFillLoop(inclinationMeasure1Mm, inclinationMeasure2Mm, inclinationMeasure3Mm, inclinationMeasure4Mm);
        autoFillLoop(inclinationMeasure1Ss, inclinationMeasure2Ss, inclinationMeasure3Ss, inclinationMeasure4Ss);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        inclination = new javax.swing.JPanel();
        fieldsPanel = new javax.swing.JPanel();
        inclinationMeasure1Minutes = new TextField(this);
        inclinationMeasure1Hours = new TextField(this);
        inclinationMeasure1Seconds = new TextField(this);
        inclinationMeasure1 = new javax.swing.JLabel();
        inclinationMeasure2Hours = new TextField(this);
        inclinationMeasure2Minutes = new TextField(this);
        inclinationMeasure2Seconds = new TextField(this);
        inclinationMeasure2 = new javax.swing.JLabel();
        inclinationMeasure3 = new javax.swing.JLabel();
        inclinationMeasure3Hours = new TextField(this);
        inclinationMeasure3Minutes = new TextField(this);
        inclinationMeasure3Seconds = new TextField(this);
        inclinationMeasure4 = new javax.swing.JLabel();
        inclinationMeasure4Hours = new TextField(this);
        inclinationMeasure4Minutes = new TextField(this);
        inclinationMeasure4Seconds = new TextField(this);
        nowButton = new Button(this);
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        inclinationMeasure1Dd = new TextField(this);
        inclinationMeasure1Mm = new TextField(this);
        inclinationMeasure1Ss = new TextField(this);
        inclinationMeasure2Dd = new TextField(this);
        inclinationMeasure2Mm = new TextField(this);
        inclinationMeasure2Ss = new TextField(this);
        inclinationMeasure3Dd = new TextField(this);
        inclinationMeasure3Mm = new TextField(this);
        inclinationMeasure3Ss = new TextField(this);
        inclinationMeasure4Dd = new TextField(this);
        inclinationMeasure4Mm = new TextField(this);
        inclinationMeasure4Ss = new TextField(this);
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        inclinationInclinationHours = new TextField(this);
        inclinationInclinationMinutes = new TextField(this);
        inclinationInclinationSeconds = new TextField(this);
        inclinationAvgInclination = new javax.swing.JLabel();
        inclinationInclinationDd = new TextField(this);
        inclinationInclinationMm = new TextField(this);
        inclinationInclinationSs = new TextField(this);
        f1Button = new Button(this);
        jLabel1 = new javax.swing.JLabel();
        f2Button = new Button(this);
        f3Button = new Button(this);
        f4Button = new Button(this);
        f1File = new TextField(this);
        f2File = new TextField(this);
        f3File = new TextField(this);
        f4File = new TextField(this);
        backNextField = new javax.swing.JPanel();
        inclinationNextButton = new Button(this);
        inclinationBackButton = new Button(this);

        setPreferredSize(new java.awt.Dimension(531, 393));

        inclination.setPreferredSize(new java.awt.Dimension(531, 393));

        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("cz/cvut/fel/gfupan/res/Bundle"); // NOI18N
        inclinationMeasure1Minutes.setText(bundle.getString("InclinationTab.inclinationMeasure1Minutes.text")); // NOI18N
        inclinationMeasure1Minutes.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure1Hours.setText(bundle.getString("InclinationTab.inclinationMeasure1Hours.text")); // NOI18N
        inclinationMeasure1Hours.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure1Seconds.setText(bundle.getString("InclinationTab.inclinationMeasure1Seconds.text")); // NOI18N
        inclinationMeasure1Seconds.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure1.setText(bundle.getString("MeasurePanel.inclinationMeasure1.text")); // NOI18N

        inclinationMeasure2Hours.setText(bundle.getString("InclinationTab.inclinationMeasure2Hours.text")); // NOI18N
        inclinationMeasure2Hours.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure2Minutes.setText(bundle.getString("InclinationTab.inclinationMeasure2Minutes.text")); // NOI18N
        inclinationMeasure2Minutes.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure2Seconds.setText(bundle.getString("InclinationTab.inclinationMeasure2Seconds.text")); // NOI18N
        inclinationMeasure2Seconds.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure2.setText(bundle.getString("MeasurePanel.inclinationMeasure2.text")); // NOI18N

        inclinationMeasure3.setText(bundle.getString("MeasurePanel.inclinationMeasure3.text")); // NOI18N

        inclinationMeasure3Hours.setText(bundle.getString("InclinationTab.inclinationMeasure3Hours.text")); // NOI18N
        inclinationMeasure3Hours.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure3Minutes.setText(bundle.getString("InclinationTab.inclinationMeasure3Minutes.text")); // NOI18N
        inclinationMeasure3Minutes.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure3Seconds.setText(bundle.getString("InclinationTab.inclinationMeasure3Seconds.text")); // NOI18N
        inclinationMeasure3Seconds.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure4.setText(bundle.getString("MeasurePanel.inclinationMeasure4.text")); // NOI18N

        inclinationMeasure4Hours.setText(bundle.getString("InclinationTab.inclinationMeasure4Hours.text")); // NOI18N
        inclinationMeasure4Hours.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure4Minutes.setText(bundle.getString("InclinationTab.inclinationMeasure4Minutes.text")); // NOI18N
        inclinationMeasure4Minutes.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationMeasure4Seconds.setText(bundle.getString("InclinationTab.inclinationMeasure4Seconds.text")); // NOI18N
        inclinationMeasure4Seconds.setPreferredSize(new java.awt.Dimension(24, 20));

        nowButton.setText(bundle.getString("InclinationTab.nowButton.text")); // NOI18N
        nowButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nowButtonActionPerformed(evt);
            }
        });

        jLabel6.setText(bundle.getString("InclinationTab.jLabel6.text")); // NOI18N

        jLabel7.setText(bundle.getString("InclinationTab.jLabel7.text")); // NOI18N

        jLabel8.setText(bundle.getString("InclinationTab.jLabel8.text")); // NOI18N

        inclinationMeasure1Dd.setText(bundle.getString("MeasurePanel.inclinationMeasure1Dd.text")); // NOI18N

        inclinationMeasure1Mm.setText(bundle.getString("MeasurePanel.inclinationMeasure1Mm.text")); // NOI18N

        inclinationMeasure1Ss.setText(bundle.getString("MeasurePanel.inclinationMeasure1Ss.text")); // NOI18N

        inclinationMeasure2Dd.setText(bundle.getString("MeasurePanel.inclinationMeasure2Dd.text")); // NOI18N

        inclinationMeasure2Mm.setText(bundle.getString("MeasurePanel.inclinationMeasure2Mm.text")); // NOI18N

        inclinationMeasure2Ss.setText(bundle.getString("MeasurePanel.inclinationMeasure2Ss.text")); // NOI18N

        inclinationMeasure3Dd.setText(bundle.getString("MeasurePanel.inclinationMeasure3Dd.text")); // NOI18N

        inclinationMeasure3Mm.setText(bundle.getString("MeasurePanel.inclinationMeasure3Mm.text")); // NOI18N

        inclinationMeasure3Ss.setText(bundle.getString("MeasurePanel.inclinationMeasure3Ss.text")); // NOI18N

        inclinationMeasure4Dd.setText(bundle.getString("MeasurePanel.inclinationMeasure4Dd.text")); // NOI18N

        inclinationMeasure4Mm.setText(bundle.getString("MeasurePanel.inclinationMeasure4Mm.text")); // NOI18N

        inclinationMeasure4Ss.setText(bundle.getString("MeasurePanel.inclinationMeasure4Ss.text")); // NOI18N

        jLabel9.setText(bundle.getString("InclinationTab.jLabel9.text")); // NOI18N

        jLabel10.setText(bundle.getString("InclinationTab.jLabel10.text")); // NOI18N

        jLabel11.setText(bundle.getString("InclinationTab.jLabel11.text")); // NOI18N

        inclinationInclinationHours.setText(bundle.getString("InclinationTab.inclinationInclinationHours.text")); // NOI18N
        inclinationInclinationHours.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationInclinationMinutes.setText(bundle.getString("InclinationTab.inclinationInclinationMinutes.text")); // NOI18N
        inclinationInclinationMinutes.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationInclinationSeconds.setText(bundle.getString("InclinationTab.inclinationInclinationSeconds.text")); // NOI18N
        inclinationInclinationSeconds.setPreferredSize(new java.awt.Dimension(24, 20));

        inclinationAvgInclination.setText(bundle.getString("MeasurePanel.inclinationAvgInclination.text")); // NOI18N

        inclinationInclinationDd.setText(bundle.getString("MeasurePanel.inclinationInclinationDd.text")); // NOI18N

        inclinationInclinationMm.setText(bundle.getString("MeasurePanel.inclinationInclinationMm.text")); // NOI18N

        inclinationInclinationSs.setText(bundle.getString("MeasurePanel.inclinationInclinationSs.text")); // NOI18N

        f1Button.setText(bundle.getString("InclinationTab.f1Button.text")); // NOI18N

        jLabel1.setText(bundle.getString("InclinationTab.jLabel1.text")); // NOI18N

        f2Button.setText(bundle.getString("InclinationTab.f2Button.text")); // NOI18N

        f3Button.setText(bundle.getString("InclinationTab.f3Button.text")); // NOI18N

        f4Button.setText(bundle.getString("InclinationTab.f4Button.text")); // NOI18N

        f1File.setEditable(false);
        f1File.setText(bundle.getString("InclinationTab.f1File.text")); // NOI18N

        f2File.setEditable(false);
        f2File.setText(bundle.getString("InclinationTab.f2File.text")); // NOI18N

        f3File.setEditable(false);
        f3File.setText(bundle.getString("InclinationTab.f3File.text")); // NOI18N

        f4File.setEditable(false);
        f4File.setText(bundle.getString("InclinationTab.f4File.text")); // NOI18N

        javax.swing.GroupLayout fieldsPanelLayout = new javax.swing.GroupLayout(fieldsPanel);
        fieldsPanel.setLayout(fieldsPanelLayout);
        fieldsPanelLayout.setHorizontalGroup(
            fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(fieldsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(inclinationMeasure4)
                        .addComponent(inclinationMeasure2)
                        .addComponent(inclinationMeasure1)
                        .addComponent(inclinationMeasure3))
                    .addComponent(inclinationAvgInclination))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                        .addComponent(inclinationMeasure2Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(inclinationMeasure2Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(inclinationMeasure2Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                        .addComponent(inclinationMeasure3Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(inclinationMeasure3Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(inclinationMeasure3Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                        .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addComponent(inclinationMeasure4Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationMeasure4Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationMeasure4Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addComponent(inclinationInclinationHours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationInclinationMinutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationInclinationSeconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel6))
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addComponent(inclinationMeasure1Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationMeasure1Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationMeasure1Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nowButton)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addComponent(inclinationInclinationDd, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationInclinationMm, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(inclinationInclinationSs, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(fieldsPanelLayout.createSequentialGroup()
                                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel9)
                                    .addComponent(inclinationMeasure1Dd, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure2Dd, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure3Dd, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure4Dd, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(inclinationMeasure2Mm, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure1Mm, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure3Mm, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(inclinationMeasure4Mm, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel10))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                                        .addComponent(jLabel11)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel1))
                                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                                        .addComponent(inclinationMeasure2Ss, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f2File, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f2Button))
                                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                                        .addComponent(inclinationMeasure3Ss, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f3File, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f3Button))
                                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                                        .addComponent(inclinationMeasure4Ss, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f4File, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f4Button))
                                    .addGroup(fieldsPanelLayout.createSequentialGroup()
                                        .addComponent(inclinationMeasure1Ss, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f1File, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(f1Button)))))))
                .addContainerGap(13, Short.MAX_VALUE))
        );
        fieldsPanelLayout.setVerticalGroup(
            fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(fieldsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(jLabel9)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationMeasure1)
                    .addComponent(inclinationMeasure1Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure1Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure1Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nowButton)
                    .addComponent(inclinationMeasure1Dd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure1Mm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure1Ss, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(f1Button)
                    .addComponent(f1File, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationMeasure2Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure2Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure2Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure2)
                    .addComponent(inclinationMeasure2Dd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure2Mm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure2Ss, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(f2Button)
                    .addComponent(f2File, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationMeasure3)
                    .addComponent(inclinationMeasure3Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure3Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure3Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure3Dd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure3Mm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure3Ss, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(f3Button)
                    .addComponent(f3File, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationMeasure4)
                    .addComponent(inclinationMeasure4Minutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure4Hours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure4Seconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure4Dd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure4Mm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationMeasure4Ss, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(f4Button)
                    .addComponent(f4File, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(fieldsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationInclinationMinutes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationInclinationHours, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationInclinationSeconds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationAvgInclination)
                    .addComponent(inclinationInclinationDd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationInclinationMm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inclinationInclinationSs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        inclinationNextButton.setText(bundle.getString("MeasurePanel.inclinationNextButton.text")); // NOI18N
        inclinationNextButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inclinationNextButtonActionPerformed(evt);
            }
        });

        inclinationBackButton.setText(bundle.getString("MeasurePanel.inclinationBackButton.text")); // NOI18N
        inclinationBackButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inclinationBackButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout backNextFieldLayout = new javax.swing.GroupLayout(backNextField);
        backNextField.setLayout(backNextFieldLayout);
        backNextFieldLayout.setHorizontalGroup(
            backNextFieldLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backNextFieldLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(inclinationBackButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(inclinationNextButton)
                .addContainerGap())
        );
        backNextFieldLayout.setVerticalGroup(
            backNextFieldLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backNextFieldLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(backNextFieldLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(inclinationNextButton)
                    .addComponent(inclinationBackButton))
                .addContainerGap())
        );

        javax.swing.GroupLayout inclinationLayout = new javax.swing.GroupLayout(inclination);
        inclination.setLayout(inclinationLayout);
        inclinationLayout.setHorizontalGroup(
            inclinationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(fieldsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(backNextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        inclinationLayout.setVerticalGroup(
            inclinationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inclinationLayout.createSequentialGroup()
                .addComponent(fieldsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 170, Short.MAX_VALUE)
                .addComponent(backNextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 531, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(inclination, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 393, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(inclination, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void inclinationBackButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inclinationBackButtonActionPerformed
        parent.moveToTab(MeasurePanel.DECLINATION_TAB);
    }//GEN-LAST:event_inclinationBackButtonActionPerformed

    private void inclinationNextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inclinationNextButtonActionPerformed
        parent.moveToTab(MeasurePanel.TOTAL_TAB);
    }//GEN-LAST:event_inclinationNextButtonActionPerformed

    private void nowButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nowButtonActionPerformed
        inclinationMeasure1Hours.requestFocus();

        inclinationMeasure1Hours.setText(new SimpleDateFormat("HH").format(new Date()));
        inclinationMeasure1Minutes.setText(new SimpleDateFormat("mm").format(new Date()));
        inclinationMeasure1Seconds.setText(new SimpleDateFormat("ss").format(new Date()));

        Session.getInstance().hasChanged(); //zmenili jsme datum
    }//GEN-LAST:event_nowButtonActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel backNextField;
    private javax.swing.JButton f1Button;
    private javax.swing.JTextField f1File;
    private javax.swing.JButton f2Button;
    private javax.swing.JTextField f2File;
    private javax.swing.JButton f3Button;
    private javax.swing.JTextField f3File;
    private javax.swing.JButton f4Button;
    private javax.swing.JTextField f4File;
    private javax.swing.JPanel fieldsPanel;
    private javax.swing.JPanel inclination;
    private javax.swing.JLabel inclinationAvgInclination;
    private javax.swing.JButton inclinationBackButton;
    private javax.swing.JTextField inclinationInclinationDd;
    private javax.swing.JTextField inclinationInclinationHours;
    private javax.swing.JTextField inclinationInclinationMinutes;
    private javax.swing.JTextField inclinationInclinationMm;
    private javax.swing.JTextField inclinationInclinationSeconds;
    private javax.swing.JTextField inclinationInclinationSs;
    private javax.swing.JLabel inclinationMeasure1;
    private javax.swing.JTextField inclinationMeasure1Dd;
    private javax.swing.JTextField inclinationMeasure1Hours;
    private javax.swing.JTextField inclinationMeasure1Minutes;
    private javax.swing.JTextField inclinationMeasure1Mm;
    private javax.swing.JTextField inclinationMeasure1Seconds;
    private javax.swing.JTextField inclinationMeasure1Ss;
    private javax.swing.JLabel inclinationMeasure2;
    private javax.swing.JTextField inclinationMeasure2Dd;
    private javax.swing.JTextField inclinationMeasure2Hours;
    private javax.swing.JTextField inclinationMeasure2Minutes;
    private javax.swing.JTextField inclinationMeasure2Mm;
    private javax.swing.JTextField inclinationMeasure2Seconds;
    private javax.swing.JTextField inclinationMeasure2Ss;
    private javax.swing.JLabel inclinationMeasure3;
    private javax.swing.JTextField inclinationMeasure3Dd;
    private javax.swing.JTextField inclinationMeasure3Hours;
    private javax.swing.JTextField inclinationMeasure3Minutes;
    private javax.swing.JTextField inclinationMeasure3Mm;
    private javax.swing.JTextField inclinationMeasure3Seconds;
    private javax.swing.JTextField inclinationMeasure3Ss;
    private javax.swing.JLabel inclinationMeasure4;
    private javax.swing.JTextField inclinationMeasure4Dd;
    private javax.swing.JTextField inclinationMeasure4Hours;
    private javax.swing.JTextField inclinationMeasure4Minutes;
    private javax.swing.JTextField inclinationMeasure4Mm;
    private javax.swing.JTextField inclinationMeasure4Seconds;
    private javax.swing.JTextField inclinationMeasure4Ss;
    private javax.swing.JButton inclinationNextButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JButton nowButton;
    // End of variables declaration//GEN-END:variables

    @Override
    public void clearFields() {
        clearField(f1File);
        clearField(f2File);
        clearField(f3File);
        clearField(f4File);
        clearField(inclinationInclinationDd);
        clearField(inclinationInclinationHours);
        clearField(inclinationInclinationMinutes);
        clearField(inclinationInclinationMm);
        clearField(inclinationInclinationSeconds);
        clearField(inclinationInclinationSs);
        clearField(inclinationMeasure1Dd);
        clearField(inclinationMeasure1Hours);
        clearField(inclinationMeasure1Minutes);
        clearField(inclinationMeasure1Mm);
        clearField(inclinationMeasure1Seconds);
        clearField(inclinationMeasure1Ss);
        clearField(inclinationMeasure2Dd);
        clearField(inclinationMeasure2Hours);
        clearField(inclinationMeasure2Minutes);
        clearField(inclinationMeasure2Mm);
        clearField(inclinationMeasure2Seconds);
        clearField(inclinationMeasure2Ss);
        clearField(inclinationMeasure3Dd);
        clearField(inclinationMeasure3Hours);
        clearField(inclinationMeasure3Minutes);
        clearField(inclinationMeasure3Mm);
        clearField(inclinationMeasure3Seconds);
        clearField(inclinationMeasure3Ss);
        clearField(inclinationMeasure4Dd);
        clearField(inclinationMeasure4Hours);
        clearField(inclinationMeasure4Minutes);
        clearField(inclinationMeasure4Mm);
        clearField(inclinationMeasure4Seconds);
        clearField(inclinationMeasure4Ss);
    }

    @Override
    public void setActionListeners() {
        f1Button.addActionListener(new LoadFAction(parent, f1File));
        f2Button.addActionListener(new LoadFAction(parent, f2File));
        f3Button.addActionListener(new LoadFAction(parent, f3File));
        f4Button.addActionListener(new LoadFAction(parent, f4File));
    }

    private void fill() {
        fillTab(0, inclinationMeasure1Hours, inclinationMeasure1Minutes, inclinationMeasure1Seconds, nowButton, inclinationMeasure1Dd, inclinationMeasure1Mm, inclinationMeasure1Ss, f1Button);
        fillTab(1, inclinationMeasure2Hours, inclinationMeasure2Minutes, inclinationMeasure2Seconds, inclinationMeasure2Dd, inclinationMeasure2Mm, inclinationMeasure2Ss, f2Button);
        fillTab(2, inclinationMeasure3Hours, inclinationMeasure3Minutes, inclinationMeasure3Seconds, inclinationMeasure3Dd, inclinationMeasure3Mm, inclinationMeasure3Ss, f3Button);
        fillTab(3, inclinationMeasure4Hours, inclinationMeasure4Minutes, inclinationMeasure4Seconds, inclinationMeasure4Dd, inclinationMeasure4Mm, inclinationMeasure4Ss, f4Button);
        fillTab(4, inclinationInclinationHours, inclinationInclinationMinutes, inclinationInclinationSeconds, inclinationInclinationDd, inclinationInclinationMm, inclinationInclinationSs);
        fillTab(5, inclinationBackButton, inclinationNextButton);
    }
}
